class Solution:
    def myPow(self, x: float, n: int) -> float:
        res, k = 1.0, x
        f = True if n < 0 else False
        n = abs(n)
        while n != 0:
            if n % 2 != 0:
               res *= k
            k *= k
            n //= 2
        if f:
            res = 1 / res
        return res


t = Solution().myPow(2, -2)
print(t)

print(2.5**10)